import React from 'react';
import { LoginPanel } from 'miaoda-auth-react';

const login_config = {
  title: '时尚衣橱登录',
  desc: '登录享受更多购物体验',
  privacyPolicyUrl: import.meta.env.VITE_PRIVACY_POLICY_URL,
  userPolicyUrl: import.meta.env.VITE_USER_POLICY_URL,
  showPolicy: import.meta.env.VITE_SHOW_POLICY,
  policyPrefix: import.meta.env.VITE_POLICY_PREFIX
};

const Login: React.FC = () => {
  return (
    <div className="min-h-screen bg-gradient-to-br from-pink-50 to-purple-100 flex items-center justify-center py-12 px-4 sm:px-6 lg:px-8">
      <div className="max-w-md w-full space-y-8">
        <div className="text-center">
          <img
            className="mx-auto h-12 w-auto"
            src="https://miaoda-site-img.cdn.bcebos.com/placeholder/code_logo_default.png"
            alt="时尚衣橱"
          />
          <h2 className="mt-6 text-3xl font-extrabold text-gray-900">
            欢迎来到时尚衣橱
          </h2>
          <p className="mt-2 text-sm text-gray-600">
            发现属于你的时尚风格
          </p>
        </div>
        
        <div className="bg-white rounded-lg shadow-lg p-8">
          <LoginPanel {...login_config} />
        </div>
      </div>
    </div>
  );
};

export default Login;